package com.terrace.web.model;

import java.io.Serializable;
import java.util.List;

/**
 * 树
 * @author jiangyg
 *
 */
public class ComboTree implements Serializable {
	
	private static final long serialVersionUID = 2501657514189496368L;

	private String id;
	
	/**
	 * 树节点名称
	 */
	private String text;
	
	/**
	 * 前面的小图标样式
	 */
	private String iconCls;
	
	/**
	 * 是否勾选状态
	 */
	private Boolean checked = false;
	
	/**
	 * 子节点
	 */
	private List<ComboTree> children;
	
	/**
	 * 是否展开(true-open,false-closed)
	 */
	private boolean state = true;

	public ComboTree() {
		super();
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getIconCls() {
		return iconCls;
	}

	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}

	public Boolean getChecked() {
		return checked;
	}

	public void setChecked(Boolean checked) {
		this.checked = checked;
	}

	public List<ComboTree> getChildren() {
		return children;
	}

	public void setChildren(List<ComboTree> children) {
		this.children = children;
	}

	public String isState() {
		return state ? "open" : "closed";
	}

	public void setState(boolean state) {
		this.state = state;
	}
	
}
